package cn.dkdoo.demoBase.service;

import cn.dkdoo.bean.vo.AddRequest;
import cn.dkdoo.bean.vo.AddResponse;
import cn.dkdoo.demoBase.repository.BaseRepository;
import cn.dkdoo.utils.entity.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author nicky
 * @date 2021/5/14 下午6:51
 */
@Service
public class BaseService {
    @Autowired
    BaseRepository baseRepository;

    public BaseResponse add(AddRequest request) {
        AddResponse response = new AddResponse();
        baseRepository.add(request);
        response.buildSuccess();
        return response;
    }
}
